import axios from '@ohos/axios';
import DogRandomBean from '../bean/DogRandomBean';

class AxiosStudyModel {
  //

  getRanDomDog(): Promise<DogRandomBean> {
    return new Promise((resolve, reject) => {
      axios.get('https://dog.ceo/api/breeds/image/random', {
        params: { "":'' },
        data: { '': '' }
      }
      ).then(response => {
        if (response.status === 200) {
          resolve(response.data)
        }
      }).catch(error => {
        reject(error)
      });
    })
  }
}
const axiosStudyModel = new AxiosStudyModel()
export default axiosStudyModel as AxiosStudyModel
